package com.digdes.calendar.dao.impl;

import com.digdes.calendar.dao.GroupDAO;
import com.digdes.calendar.model.Group;
import com.digdes.calendar.model.impl.GroupImpl;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

public class GroupDAOImpl extends HibernateDaoSupport implements GroupDAO {
    public void saveGroup(Group g) {
        getHibernateTemplate().save(g);
    }
    public void updateGroup(Group g){
        getHibernateTemplate().update(g);
    }
    public void deleteGroup(Long id){
        Object group = getHibernateTemplate().get(GroupImpl.class, id)   ;
        getHibernateTemplate().delete(group);
    }
}
